package 封装;

public class TeacherMain {

    public static void main(String[] args) {

        Teacher s1 = new Teacher();

        s1.setName("王五");
        s1.setAge(33);
        s1.setGender('男');
        s1.setNum(2220);
        s1.setMajor("物理");
        System.out.println(s1);
        s1.work();
        s1.eat();

        Teacher s2 = new Teacher("赵六" , 3330 , '女' , 44 , "化学");
        System.out.println("姓名："+s2.getName());
        System.out.println(s2);
        s2.work();
        s2.eat();
    }

}